<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:comps="http://java.sun.com/jsf/composite/components">
	
<h:panelGroup layout="block" styleClass="conteudo">
	
	<h:panelGrid columns="2" styleClass="blogGrid" 
		columnClasses="blogGridEsquerda blogGridVerticalAlignTop, blogGridDireita blogGridVerticalAlignTop">
				
		<h:panelGroup id="posts">
		
			<h:panelGroup layout="block">		
				<h:outputText value="#{locale['blog.pesquisa.resultado.titulo']}" style="font-size: 1.4em; font-weight: bold;" />
			</h:panelGroup>
		
			<h:form id="postsForm">
				
				<p:dataList id="postsList"
					styleClass="postsDataList"
					var="post" value="#{BlogBean.postsPesquisa}"
					paginator="true" paginatorAlwaysVisible="true" paginatorPosition="bottom"
					rows="5" type="none">
					
					<h:panelGroup layout="block" styleClass="postGeralItem">
						
						<h:panelGroup layout="block">
							<h:commandLink id="acessarPostBtn"
								styleClass="postGeralLink"
								action="#{BlogBean.exibirPost(post)}"
								ajax="false">
								<h:outputText value="#{post.titulo}" />
							</h:commandLink>
						</h:panelGroup>
						
						<h:panelGroup layout="block">
	
							<h:panelGroup layout="block" 
								styleClass="postGeralTexto">
								<h:outputText value="#{post.conteudoResumo}">
									<f:converter converterId="converter.StringTruncateConverter" />
									<f:attribute name="truncateLimit" value="200" />
								</h:outputText>
								<h:outputText value="..." />
							</h:panelGroup>
														
						</h:panelGroup>
					
					</h:panelGroup>					
				
				</p:dataList>				
			
			</h:form>
		
		</h:panelGroup>
		
		<ui:include src="/resources/templates/blog/navegacaoBlogTemplate.xhtml" />
		
	</h:panelGrid>
		
</h:panelGroup>	

</ui:composition>